import { defineStore } from 'pinia';
export const useModel = defineStore('model', () => {
    const registerModel = reactive({
        base: false,
        finish: false
    })
    const loginModel = ref(false)
    const wechatModel = ref(false)

    const changeToForget = () => {
        loginModel.value = false;
        registerModel.base = false;
        registerModel.finish = false;
        forgetModel.first = true
    }

    // 忘记密码框
    const forgetModel = reactive({
        first: false,
        second: false,
        phoneCache: '', //临时缓存手机号码
    });

    const changeToFinish = () => {
        registerModel.base = false
        registerModel.finish = true;
    }
    return {
        registerModel,
        loginModel,
        wechatModel,
        changeToFinish,
        changeToForget
    };
}
);
